package com.winai.launcher.BroadcastReceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.winai.launcher.service.LauncherService;

public class ServiceStarter extends BroadcastReceiver {

    static final String LOG_TAG = "ServiceStarter";
    static final String BOOTUP = "mediatek.intent.action.BOOT_COMPLETED";
    static final String BOOTUP2 = "android.intent.action.BOOT_COMPLETED";

    @Override
    public void onReceive(Context contxt, Intent intent) {
        Log.d("@Zhxk_" + LOG_TAG, "onReceiver() action " + intent.getAction());
        if (intent.getAction().equals(BOOTUP) || intent.getAction().equals(BOOTUP2)) {
            Log.d("@Zhxk_" + LOG_TAG, "onReceiver() 开机完成");
            contxt.startService(new Intent(contxt, LauncherService.class));
        }
    }
}
